<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <style>

        .clearfix:before,
        .clearfix:after {
            display: table;
            content: "";
        }

        .clearfix:after {
            clear: both
        }

        html,
        body,
        #app {
            height: 100%;
            min-width: 1366px;
        }

        .el-table__body-wrapper:: -o-scrollbar {
            display: none;
        }

        .el-table__body-wrapper:: -moz-scrollbar {
            display: none;
        }

        .el-table .warning-row {
            background: oldlace;
        }

        .el-table .success-row {
            background: #f0f9eb;
        }

        .el-table {
            position: relative;
        }

        .viewSendContentMsgBox {
            width: 45% !important;
            overflow-y: scroll !important;
            max-height: 80% !important;
        }
    </style>
    <link type="text/css" rel="styleSheet" href="css/element-ui.css"/>
    <script src="js/vue.min.js" type="application/javascript"></script>
    <!--    <script src="/js/jquery.js" type="application/javascript"></script>-->
    <!--    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>-->
    <script src="js/axios.min.js"></script>
    <script src="js/element-ui.js" type="application/javascript"></script>
    <script src="common/common-js.js"></script>
</head>
<body>
<div id="app">
    <el-card class="box-card">
        <div slot="header" class="clearfix">
            <el-tabs v-model="activeName" @tab-click="handleClick">

                <el-tab-pane label="开始对接" name="start">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="startParams.years" clearable placeholder="年份"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="startParams.months" clearable placeholder="月份"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="10">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="startParams.accSets" clearable placeholder="账套号"></el-input>
                                    </div>
                                </el-col>
                            </el-row>
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="startParams.serviceCodes" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="账套数据" value="W01001"></el-option>
                                            <el-option label="账套科目初始化" value="W01002"></el-option>
                                            <el-option label="会计凭证数据" value="W01003"></el-option>
                                            <el-option label="集体土地" value="W02005"></el-option>
                                            <el-option label="无形资产" value="W02004"></el-option>
                                            <el-option label="存货资产" value="W02003"></el-option>
                                            <el-option label="生物资产" value="W02002"></el-option>
                                            <el-option label="固定资产" value="W02001"></el-option>
                                            <el-option label="固定资产-信息变更" value="W01006"></el-option>
                                            <el-option label="固定资产-价值变动" value="W01007"></el-option>
                                            <el-option label="固定资产-处置记录" value="W01008"></el-option>
                                            <el-option label="固定资产-折旧记录" value="W01009"></el-option>
                                            <el-option label="收支日记账" value="W04001"></el-option>
                                            <el-option label="债权公布" value="W01012"></el-option>
                                            <el-option label="债务公布" value="W01011"></el-option>
                                            <el-option label="资产负债表" value="W01010"></el-option>
                                            <el-option label="合同信息" value="W03001"></el-option>
                                            <el-option label="账套月结" value="W01004"></el-option>
                                            <el-option label="附件上传" value="DJ_FILE"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-checkbox v-model="startParams.noCheck">是否跳过社会信用代码检验</el-checkbox>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-checkbox v-model="startParams.noCheckCanFlag">是否跳过账套canFlag校验</el-checkbox>
                                    </div>
                                </el-col>

                            </el-row>
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="20">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="startPushData()">推送数据</el-button>
                                    </div>
                                </el-col>
                            </el-row>
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="10">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryTaskIdParams.taskIds" clearable placeholder="taskId号码"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="4">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="queryTaskId()">查询taskId</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="20">
                                    <el-input
                                            type="textarea"
                                            :rows="5"
                                            placeholder="结果"
                                            v-model="queryTaskIdResult">
                                    </el-input>
                                </el-col>
                            </el-row>

                        </div>
                    </el-card>
                </el-tab-pane>

                <el-tab-pane label="统计表" name="statistics">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryStatisticsParams.creditCode" clearable @clear="getStatisticsData()" placeholder="查询统一社会信息代码"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryStatisticsParams.typeName" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="账套数据" value="账套数据"></el-option>
                                            <el-option label="账套科目初始化" value="账套科目初始化"></el-option>
                                            <el-option label="会计凭证数据" value="会计凭证数据"></el-option>
                                            <el-option label="删除会计凭证" value="删除会计凭证"></el-option>
                                            <el-option label="集体土地" value="集体土地"></el-option>
                                            <el-option label="无形资产" value="无形资产"></el-option>
                                            <el-option label="存货资产" value="存货资产"></el-option>
                                            <el-option label="生物资产" value="生物资产"></el-option>
                                            <el-option label="固定资产" value="固定资产"></el-option>
                                            <el-option label="删除固定资产" value="删除固定资产"></el-option>
                                            <el-option label="固定资产-信息变更" value="固定资产-信息变更"></el-option>
                                            <el-option label="固定资产-价值变动" value="固定资产-价值变动"></el-option>
                                            <el-option label="固定资产-处置记录" value="固定资产-处置记录"></el-option>
                                            <el-option label="固定资产-折旧记录" value="固定资产-折旧记录"></el-option>
                                            <el-option label="收支日记账" value="收支日记账"></el-option>
                                            <el-option label="债权公布" value="债权公布"></el-option>
                                            <el-option label="债务公布" value="债务公布"></el-option>
                                            <el-option label="资产负债表" value="资产负债表"></el-option>
                                            <el-option label="合同信息" value="合同信息"></el-option>
                                            <el-option label="账套月结" value="账套月结"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getStatisticsData()">搜索</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-table
                                    :data="allStatisticsData"
                                    :row-class-name="tableRowClassName"
                                    :row-style="{height:'30px'}" :cell-style="{padding: '0'}"
                                    style="width: 100%">
                                <el-table-column
                                        prop="typeName"
                                        label="对接数据类型"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="info1"
                                        label="应上报">
                                </el-table-column>
                                <el-table-column
                                        prop="info2"
                                        label="省平台入库">
                                </el-table-column>
                                <el-table-column
                                        prop="info3"
                                        label="全国平台校验成功">
                                </el-table-column>

                                <el-table-column
                                        width="260"
                                        label="对接情况">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="judgeAbutmentInfo(scope.row) === '1'">全国平台校验成功数较多(80%~99%)</el-tag>
                                        <el-tag type="warning" v-if="judgeAbutmentInfo(scope.row) === '2'">全国平台校验成功数一般(50%~80%)</el-tag>
                                        <el-tag type="danger" v-if="judgeAbutmentInfo(scope.row) === '3'">全国平台校验成功数较少(0%~50%)</el-tag>
                                        <el-tag type="danger" v-if="judgeAbutmentInfo(scope.row) === '4'">未生成推送数据</el-tag>
                                        <el-tag type="success" v-if="judgeAbutmentInfo(scope.row) === '5'">全国平台校验成功数全部完成</el-tag>
                                    </template>
                                </el-table-column>

                            </el-table>
                        </div>
                    </el-card>
                </el-tab-pane>


                <!--统计表-月份-->
                <el-tab-pane label="统计表-月份" name="statisticsMonths">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryStatisticsParams.creditCode" clearable @clear="getStatisticsMonthsData()" placeholder="查询统一社会信息代码"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryStatisticsParams.typeName" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="账套数据" value="账套数据"></el-option>
                                            <el-option label="账套科目初始化" value="账套科目初始化"></el-option>
                                            <el-option label="会计凭证数据" value="会计凭证数据"></el-option>
                                            <el-option label="删除会计凭证" value="删除会计凭证"></el-option>
                                            <el-option label="集体土地" value="集体土地"></el-option>
                                            <el-option label="无形资产" value="无形资产"></el-option>
                                            <el-option label="存货资产" value="存货资产"></el-option>
                                            <el-option label="生物资产" value="生物资产"></el-option>
                                            <el-option label="固定资产" value="固定资产"></el-option>
                                            <el-option label="删除固定资产" value="删除固定资产"></el-option>
                                            <el-option label="固定资产-信息变更" value="固定资产-信息变更"></el-option>
                                            <el-option label="固定资产-价值变动" value="固定资产-价值变动"></el-option>
                                            <el-option label="固定资产-处置记录" value="固定资产-处置记录"></el-option>
                                            <el-option label="固定资产-折旧记录" value="固定资产-折旧记录"></el-option>
                                            <el-option label="收支日记账" value="收支日记账"></el-option>
                                            <el-option label="债权公布" value="债权公布"></el-option>
                                            <el-option label="债务公布" value="债务公布"></el-option>
                                            <el-option label="资产负债表" value="资产负债表"></el-option>
                                            <el-option label="合同信息" value="合同信息"></el-option>
                                            <el-option label="账套月结" value="账套月结"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryStatisticsParams.info" placeholder="请选择数据对接情况">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="应上报" value="应上报"></el-option>
                                            <el-option label="省平台入库" value="省平台入库"></el-option>
                                            <el-option label="全国平台校验成功" value="全国平台校验成功"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <!--                                        <el-input v-model="queryStatisticsParams.years" placeholder="输入年份"></el-input>-->
                                        <el-date-picker
                                                v-model="queryStatisticsParams.years"
                                                type="year"
                                                value-format="yyyy"
                                                placeholder="输入年份">
                                        </el-date-picker>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <!--                                        <el-input v-model="queryStatisticsParams.months" placeholder="输入月份"></el-input>-->
                                        <el-date-picker
                                                v-model="queryStatisticsParams.months"
                                                type="month"
                                                value-format="M"
                                                placeholder="输入月份">
                                        </el-date-picker>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getStatisticsMonthsData()">搜索</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-table
                                    :data="allStatisticsData"
                                    :row-class-name="tableRowClassName"
                                    :row-style="{height:'30px'}"
                                    :cell-style="{padding: '0'}"
                                    style="width: 100%"
                                    height="700">
                                <el-table-column
                                        prop="typeName"
                                        label="对接数据类型"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="info"
                                        label="对接情况"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="months1"
                                        label="一月">
                                </el-table-column>
                                <el-table-column
                                        prop="months2"
                                        label="二月">
                                </el-table-column>
                                <el-table-column
                                        prop="months3"
                                        label="三月">
                                </el-table-column>
                                <el-table-column
                                        prop="months4"
                                        label="四月">
                                </el-table-column>
                                <el-table-column
                                        prop="months5"
                                        label="五月">
                                </el-table-column>
                                <el-table-column
                                        prop="months6"
                                        label="六月">
                                </el-table-column>
                                <el-table-column
                                        prop="months7"
                                        label="七月">
                                </el-table-column>
                                <el-table-column
                                        prop="months8"
                                        label="八月">
                                </el-table-column>
                                <el-table-column
                                        prop="months9"
                                        label="九月">
                                </el-table-column>
                                <el-table-column
                                        prop="months10"
                                        label="十月">
                                </el-table-column>
                                <el-table-column
                                        prop="months11"
                                        label="十一月">
                                </el-table-column>
                                <el-table-column
                                        prop="months12"
                                        label="十二月">
                                </el-table-column>

                                <el-table-column
                                        prop="abutmentStatus"
                                        label="数据对接情况"
                                        width="250">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.abutmentStatus == '1'">全国平台校验成功数较多(80%~99%)</el-tag>
                                        <el-tag type="warning" v-if="scope.row.abutmentStatus == '2'">全国平台校验成功数一般(50%~80%)</el-tag>
                                        <el-tag type="danger" v-if="scope.row.abutmentStatus == '3'">全国平台校验成功数较少(0%~50%)</el-tag>
                                        <el-tag type="danger" v-if="scope.row.abutmentStatus == '4'">未生成推送数据</el-tag>
                                        <el-tag type="success" v-if="scope.row.abutmentStatus == '5'">全国平台校验成功数全部完成</el-tag>
                                        <el-tag type="danger" v-if="scope.row.abutmentStatus == '-1'">选择月份无情况</el-tag>
                                    </template>
                                </el-table-column>

                            </el-table>
                        </div>
                    </el-card>
                </el-tab-pane>

                <!--四无统计表-->
                <el-tab-pane label="四无统计表" name="statisticsTreeData">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-cascader v-model="queryStatisticsTreeDataParams.distNo" :props="distCascaderProps" placeholder="查询地区" :show-all-levels="false"></el-cascader>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryStatisticsTreeDataParams.years" clearable @clear="getTreeStatisticsData()" placeholder="查询年份"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getTreeStatisticsData()">搜索</el-button>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="exportExcelTreeStatisticsData()">导出Excel</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-table
                                    :data="allStatisticsData"
                                    :row-class-name="tableRowClassName"
                                    :row-style="{height:'30px'}" :cell-style="{padding: '0'}"
                                    style="width: 100%">
                                <el-table-column
                                        prop="distName"
                                        label="地区名称"
                                        width="250">
                                </el-table-column>
                                <el-table-column label="建账套组织数">
                                    <el-table-column
                                            prop="zt_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="zt_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="zt_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="zt_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>

                                <el-table-column
                                        label="建凭证组织数">
                                    <el-table-column
                                            prop="pz_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="pz_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="pz_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="pz_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>
                                <el-table-column
                                        label="建资产组织数">
                                    <el-table-column
                                            prop="zc_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="zc_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="zc_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="zc_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>
                                <el-table-column
                                        label="建合同组织数">
                                    <el-table-column
                                            prop="ht_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="ht_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="ht_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="ht_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>
                                <el-table-column
                                        label="无凭证组织数">
                                    <el-table-column
                                            prop="no_pz_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_pz_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_pz_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_pz_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>
                                <el-table-column
                                        label="无资产组织数">
                                    <el-table-column
                                            prop="no_zc_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_zc_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_zc_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_zc_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>
                                <el-table-column
                                        label="无合同组织数">
                                    <el-table-column
                                            prop="no_ht_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_ht_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_ht_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_ht_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>
                                <el-table-column
                                        label="无存款组织数">
                                    <el-table-column
                                            prop="no_ck_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_ck_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_ck_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_ck_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>
                                <el-table-column
                                        label="四无组织数">
                                    <el-table-column
                                            prop="no_4_cnt"
                                            label="总计">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_4_n3_cnt"
                                            label="联合总社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_4_n2_cnt"
                                            label="经联社">
                                    </el-table-column>
                                    <el-table-column
                                            prop="no_4_n1_cnt"
                                            label="经济社">
                                    </el-table-column>
                                </el-table-column>


                            </el-table>
                        </div>
                    </el-card>
                </el-tab-pane>


                <!--账套信息-->
                <el-tab-pane label="账套信息" name="accSet">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryParams.accSet" clearable @clear="getAllData()" placeholder="查询账套号"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryParams.creditCode" clearable @clear="getAllData()" placeholder="查询统一社会信息代码"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryParams.sjjhbz" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="对接成功" value="1"></el-option>
                                            <el-option label="等待对接" value="0"></el-option>
                                            <el-option label="对接异常" value="2"></el-option>
                                            <el-option label="已推送省平台，等待数据入库" value="3"></el-option>
                                            <el-option label="省平台已接收入库，校验结果等待中" value="4"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryParams.opType" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="新增和修改" value="1"></el-option>
                                            <el-option label="删除" value="3"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <!--                                        <el-input v-model="queryStatisticsParams.years" placeholder="输入年份"></el-input>-->
                                        <el-date-picker
                                                v-model="queryParams.years"
                                                type="year"
                                                value-format="yyyy"
                                                placeholder="输入年份">
                                        </el-date-picker>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <!--                                        <el-input v-model="queryStatisticsParams.months" placeholder="输入月份"></el-input>-->
                                        <el-date-picker
                                                v-model="queryParams.months"
                                                type="month"
                                                value-format="M"
                                                placeholder="输入月份">
                                        </el-date-picker>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getAllData()">搜索</el-button>
                                    </div>
                                </el-col>
                                <!--                                <el-col :span="3">-->
                                <!--                                    <div class="grid-content bg-purple">-->
                                <!--                                        <el-button type="primary" @click="tryPutData()">重新推送数据</el-button>-->
                                <!--                                    </div>-->
                                <!--                                </el-col>-->
                            </el-row>

                            <el-table
                                    :data="allData"
                                    style="width: 100%"
                                    height="700">
                                <el-table-column
                                        prop="accSet"
                                        label="账套号"
                                        width="70">
                                </el-table-column>
                                <el-table-column
                                        prop="DATA_KEY"
                                        label="账套唯一标识"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="MC"
                                        label="账套名称"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="TYSHXYDM"
                                        label="统一社会信用代码"
                                        width="180">
                                </el-table-column>
                                <!--                                <el-table-column-->
                                <!--                                        prop="sjjhbz"-->
                                <!--                                        width="180"-->
                                <!--                                        label="数据交换标志">-->
                                <!--                                    <template v-slot="scope">-->
                                <!--                                        <el-tag type="success" v-if="scope.row.sjjhbz == '1'">采集完成</el-tag>-->
                                <!--                                        <el-tag type="info" v-if="scope.row.sjjhbz == '0'">待采集</el-tag>-->
                                <!--                                        <el-tag type="danger" v-if="scope.row.sjjhbz == '-1'">采集失败</el-tag>-->
                                <!--                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '-2'">等待重试</el-tag>-->
                                <!--                                    </template>-->
                                <!--                                </el-table-column>-->
                                <el-table-column
                                        prop="QY_RQ"
                                        label="账套启用期间">
                                </el-table-column>
                                <el-table-column
                                        prop="TY_RQ"
                                        label="账套停用期间">
                                </el-table-column>
                                <el-table-column
                                        prop="sjjhbz"
                                        width="260"
                                        label="数据交换标志">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.sjjhbz == '1'">对接成功</el-tag>
                                        <el-tag type="info" v-if="scope.row.sjjhbz == '0'">等待对接</el-tag>
                                        <el-tag type="danger" v-if="scope.row.sjjhbz == '2'">对接异常</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '3'">已推送省平台，等待数据入库</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '4'">省平台已接收入库，校验结果等待中</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="taskId"
                                        width="180"
                                        label="任务id">
                                </el-table-column>

                                <el-table-column
                                        label="操作"
                                        width="100">
                                    <template slot-scope="scope">
                                        <el-button @click="queryTaskStatus(scope.row)" type="text" size="small">查看</el-button>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <el-pagination
                                    @size-change="handleAllDataSizeChange"
                                    @current-change="handleAllDataCurrentChange"
                                    :current-page="queryParams.current"
                                    :page-sizes="[30, 100, 200, 500, 1000]"
                                    :page-size="queryParams.size"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="allDataTotal">
                            </el-pagination>
                            <!--<div style="margin-top: 20px">
                                <el-button @click="pushMassage()">切换第二、第三行的选中状态</el-button>
                                <el-button @click="manualCollectData()" type="primary">手动采集数据</el-button>
                            </div>-->
                        </div>
                    </el-card>
                </el-tab-pane>



                <!--账套科目-->
                <el-tab-pane label="账套科目" name="accCode">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryParams.creditCode" clearable @clear="getAllData()" placeholder="查询统一社会信息代码"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryParams.sjjhbz" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="对接成功" value="1"></el-option>
                                            <el-option label="等待对接" value="0"></el-option>
                                            <el-option label="对接异常" value="2"></el-option>
                                            <el-option label="已推送省平台，等待数据入库" value="3"></el-option>
                                            <el-option label="省平台已接收入库，校验结果等待中" value="4"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryParams.opType" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="新增和修改" value="1"></el-option>
                                            <el-option label="删除" value="3"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <!--                                        <el-input v-model="queryStatisticsParams.years" placeholder="输入年份"></el-input>-->
                                        <el-date-picker
                                                v-model="queryParams.years"
                                                type="year"
                                                value-format="yyyy"
                                                placeholder="输入年份">
                                        </el-date-picker>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <!--                                        <el-input v-model="queryStatisticsParams.months" placeholder="输入月份"></el-input>-->
                                        <el-date-picker
                                                v-model="queryParams.months"
                                                type="month"
                                                value-format="M"
                                                placeholder="输入月份">
                                        </el-date-picker>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getAllData()">搜索</el-button>
                                    </div>
                                </el-col>
                                <!--                                <el-col :span="3">-->
                                <!--                                    <div class="grid-content bg-purple">-->
                                <!--                                        <el-button type="primary" @click="tryPutData()">重新推送数据</el-button>-->
                                <!--                                    </div>-->
                                <!--                                </el-col>-->
                            </el-row>

                            <el-table
                                    :data="allData"
                                    style="width: 100%"
                                    height="700">
                                <el-table-column
                                        prop="ZT_DATA_KEY"
                                        label="账套唯一标识"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="NF"
                                        label="年份">
                                </el-table-column>
                                <el-table-column
                                        prop="BM"
                                        label="科目编码">
                                </el-table-column>
                                <el-table-column
                                        prop="MC"
                                        label="科目名称">
                                </el-table-column>
                                <el-table-column
                                        prop="YEFX"
                                        label="科目余额方向">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.sjjhbz == '1'">借方</el-tag>
                                        <el-tag type="success" v-if="scope.row.sjjhbz == '2'">贷方</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="sjjhbz"
                                        label="数据交换标志">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.sjjhbz == '1'">对接成功</el-tag>
                                        <el-tag type="info" v-if="scope.row.sjjhbz == '0'">等待对接</el-tag>
                                        <el-tag type="danger" v-if="scope.row.sjjhbz == '2'">对接异常</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '3'">已推送省平台，等待数据入库</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '4'">省平台已接收入库，校验结果等待中</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="taskId"
                                        label="任务id">
                                </el-table-column>
                                <el-table-column
                                        label="操作"
                                        width="100">
                                    <template slot-scope="scope">
                                        <el-button @click="queryTaskStatus(scope.row)" type="text" size="small">查看</el-button>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <el-pagination
                                    @size-change="handleAllDataSizeChange"
                                    @current-change="handleAllDataCurrentChange"
                                    :current-page="queryParams.current"
                                    :page-sizes="[30, 100, 200, 500, 1000]"
                                    :page-size="queryParams.size"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="allDataTotal">
                            </el-pagination>
                        </div>
                    </el-card>
                </el-tab-pane>



                <!--会计凭证-->
                <el-tab-pane label="会计凭证" name="voucher">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryParams.creditCode" clearable @clear="getAllData()" placeholder="查询统一社会信息代码"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryParams.sjjhbz" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="对接成功" value="1"></el-option>
                                            <el-option label="等待对接" value="0"></el-option>
                                            <el-option label="对接异常" value="2"></el-option>
                                            <el-option label="已推送省平台，等待数据入库" value="3"></el-option>
                                            <el-option label="省平台已接收入库，校验结果等待中" value="4"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryParams.opType" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="新增和修改" value="1"></el-option>
                                            <el-option label="删除" value="3"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <!--                                        <el-input v-model="queryStatisticsParams.years" placeholder="输入年份"></el-input>-->
                                        <el-date-picker
                                                v-model="queryParams.years"
                                                type="year"
                                                value-format="yyyy"
                                                placeholder="输入年份">
                                        </el-date-picker>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <!--                                        <el-input v-model="queryStatisticsParams.months" placeholder="输入月份"></el-input>-->
                                        <el-date-picker
                                                v-model="queryParams.months"
                                                type="month"
                                                value-format="M"
                                                placeholder="输入月份">
                                        </el-date-picker>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getAllData()">搜索</el-button>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="setToNeedDuijie()">设置为待推送</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-table
                                    :data="allData"
                                    style="width: 100%"
                                    ref="voucher"
                                    height="700">
                                <el-table-column
                                        type="selection"
                                        width="55">
                                </el-table-column>
                                <el-table-column
                                        prop="ZT_DATA_KEY"
                                        label="账套唯一标识"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="DATA_KEY"
                                        label="凭证唯一标识">
                                </el-table-column>
                                <el-table-column
                                        prop="PZXH"
                                        label="凭证序号">
                                </el-table-column>
                                <el-table-column
                                        prop="PZRQ"
                                        label="凭证日期">
                                </el-table-column>
                                <el-table-column
                                        prop="ZT"
                                        label="凭证状态">
                                    <template v-slot="scope">
                                        <el-tag type="warning" v-if="scope.row.ZT == '10'">待提交</el-tag>
                                        <el-tag type="warning" v-if="scope.row.ZT == '20'">待审核</el-tag>
                                        <el-tag type="danger" v-if="scope.row.ZT == '30'">已驳回</el-tag>
                                        <el-tag type="warning" v-if="scope.row.ZT == '40'">已审核</el-tag>
                                        <el-tag type="success" v-if="scope.row.ZT == '50'">已入账</el-tag>
                                        <el-tag type="danger" v-if="scope.row.ZT == '60'">已冲销</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="sjjhbz"
                                        width="260"
                                        label="数据交换标志">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.sjjhbz == '1'">对接成功</el-tag>
                                        <el-tag type="info" v-if="scope.row.sjjhbz == '0'">等待对接</el-tag>
                                        <el-tag type="danger" v-if="scope.row.sjjhbz == '2'">对接异常</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '3'">已推送省平台，等待数据入库</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '4'">省平台已接收入库，校验结果等待中</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="taskId"
                                        label="任务id">
                                </el-table-column>
                                <el-table-column
                                        label="操作"
                                        width="100">
                                    <template slot-scope="scope">
                                        <el-button @click="queryTaskStatus(scope.row)" type="text" size="small">查看</el-button>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <el-pagination
                                    @size-change="handleAllDataSizeChange"
                                    @current-change="handleAllDataCurrentChange"
                                    :current-page="queryParams.current"
                                    :page-sizes="[30, 100, 200, 500, 1000]"
                                    :page-size="queryParams.size"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="allDataTotal">
                            </el-pagination>
                        </div>
                    </el-card>
                </el-tab-pane>


                <!--账套月结-->
                <el-tab-pane label="账套月结" name="settlement">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryParams.creditCode" clearable @clear="getAllData()" placeholder="查询统一社会信息代码"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryParams.sjjhbz" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="对接成功" value="1"></el-option>
                                            <el-option label="等待对接" value="0"></el-option>
                                            <el-option label="对接异常" value="2"></el-option>
                                            <el-option label="已推送省平台，等待数据入库" value="3"></el-option>
                                            <el-option label="省平台已接收入库，校验结果等待中" value="4"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="queryParams.opType" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="新增和修改" value="1"></el-option>
                                            <el-option label="删除" value="3"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryParams.years" placeholder="输入年份"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="queryParams.months" placeholder="输入月份"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getAllData()">搜索</el-button>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="setToNeedDuijie()">设置为待推送</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-table
                                    :data="allData"
                                    style="width: 100%"
                                    ref="settlement"
                                    height="700">
                                <el-table-column
                                        type="selection"
                                        width="55">
                                </el-table-column>
                                <el-table-column
                                        prop="ZT_DATA_KEY"
                                        label="账套唯一标识"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="TYSHXYDM"
                                        label="统一社会信用代码">
                                </el-table-column>
                                <el-table-column
                                        prop="KJQJ"
                                        label="月结的会计期间">
                                </el-table-column>
                                <el-table-column
                                        prop="sjjhbz"
                                        width="260"
                                        label="数据交换标志">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.sjjhbz == '1'">对接成功</el-tag>
                                        <el-tag type="info" v-if="scope.row.sjjhbz == '0'">等待对接</el-tag>
                                        <el-tag type="danger" v-if="scope.row.sjjhbz == '2'">对接异常</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '3'">已推送省平台，等待数据入库</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '4'">省平台已接收入库，校验结果等待中</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="taskId"
                                        label="任务id">
                                </el-table-column>
                                <el-table-column
                                        label="操作"
                                        width="100">
                                    <template slot-scope="scope">
                                        <el-button @click="queryTaskStatus(scope.row)" type="text" size="small">查看</el-button>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <el-pagination
                                    @size-change="handleAllDataSizeChange"
                                    @current-change="handleAllDataCurrentChange"
                                    :current-page="queryParams.current"
                                    :page-sizes="[30, 100, 200, 500, 1000]"
                                    :page-size="queryParams.size"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="allDataTotal">
                            </el-pagination>
                        </div>
                    </el-card>
                </el-tab-pane>

                <el-tab-pane label="任务详情" name="duijie_async">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="duijieAsyncParams.taskId" clearable @clear="getDuijieAsyncData()" placeholder="查询taskId"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="duijieAsyncParams.creditCode" clearable @clear="getDuijieAsyncData()" placeholder="查询统一社会信息代码"></el-input>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="duijieAsyncParams.sjjhbz" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="对接成功" value="1"></el-option>
                                            <el-option label="对接异常" value="2"></el-option>
                                            <el-option label="已推送省平台，等待数据入库" value="3"></el-option>
                                            <el-option label="省平台已接收入库，校验结果等待中" value="4"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="duijieAsyncParams.serviceCode" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="账套数据" value="W01001"></el-option>
                                            <el-option label="账套科目初始化" value="W01002"></el-option>
                                            <el-option label="会计凭证数据" value="W01003"></el-option>
                                            <el-option label="删除会计凭证" value="D01003"></el-option>
                                            <el-option label="集体土地" value="W02005"></el-option>
                                            <el-option label="无形资产" value="W02004"></el-option>
                                            <el-option label="存货资产" value="W02003"></el-option>
                                            <el-option label="生物资产" value="W02002"></el-option>
                                            <el-option label="固定资产" value="W02001"></el-option>
                                            <el-option label="删除固定资产" value="D02001"></el-option>
                                            <el-option label="固定资产-信息变更" value="W01006"></el-option>
                                            <el-option label="固定资产-价值变动" value="W01007"></el-option>
                                            <el-option label="固定资产-处置记录" value="W01008"></el-option>
                                            <el-option label="固定资产-折旧记录" value="W01009"></el-option>
                                            <el-option label="收支日记账" value="W04001"></el-option>
                                            <el-option label="债权公布" value="W01012"></el-option>
                                            <el-option label="债务公布" value="W01011"></el-option>
                                            <el-option label="资产负债表" value="W01010"></el-option>
                                            <el-option label="合同信息" value="W03001"></el-option>
                                            <el-option label="账套月结" value="W01004"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getDuijieAsyncData()">搜索</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-table
                                    :data="allDuijieAsyncData"
                                    style="width: 100%"
                                    height="700">
                                <el-table-column
                                        prop="taskId"
                                        label="任务id"
                                        width="180">
                                </el-table-column>
                                <el-table-column
                                        prop="type"
                                        label="类型"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="sjjhbz"
                                        width="120"
                                        label="数据交换标志">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.sjjhbz == '1'">对接成功</el-tag>
                                        <el-tag type="info" v-if="scope.row.sjjhbz == '0'">等待对接</el-tag>
                                        <el-tag type="danger" v-if="scope.row.sjjhbz == '2'">对接异常</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '3'">已推送省平台，等待数据入库</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '4'">省平台已接收入库，校验结果等待中</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="writeLog"
                                        label="日志信息"
                                        width="800"
                                        :show-overflow-tooltip="false">
                                </el-table-column>
                                <el-table-column
                                        prop="createDate"
                                        width="160"
                                        label="发送时间">
                                </el-table-column>
                                <el-table-column
                                        prop="writeDate"
                                        width="160"
                                        label="返回时间">
                                </el-table-column>

                                <el-table-column
                                        label="操作">
                                    <template slot-scope="scope">
                                        <el-button @click="viewSendContent(scope.row)" type="text" size="small">查看报文</el-button>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <el-pagination
                                    @size-change="handleDuijieAsyncDataSizeChange"
                                    @current-change="handleDuijieAsyncDataCurrentChange"
                                    :current-page="duijieAsyncParams.current"
                                    :page-sizes="[30, 100, 200, 500, 1000]"
                                    :page-size="duijieAsyncParams.size"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="duijieAsyncDataTotal">
                            </el-pagination>
                            <!--<div style="margin-top: 20px">
                                <el-button @click="pushMassage()">切换第二、第三行的选中状态</el-button>
                                <el-button @click="manualCollectData()" type="primary">手动采集数据</el-button>
                            </div>-->
                        </div>
                    </el-card>
                </el-tab-pane>


                <el-tab-pane label="未处理失败信息" name="fail">
                    <el-card class="box-card">
                        <div slot="header" class="clearfix">
                            <el-row :gutter="20" style="margin-bottom: 10px;">
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-input v-model="failParams.creditCode" clearable @clear="getFailData()" placeholder="查询统一社会信息代码"></el-input>
                                    </div>
                                </el-col>
                                <!--                                <el-col :span="3">-->
                                <!--                                    <div class="grid-content bg-purple">-->
                                <!--                                        <el-select v-model="queryParams.sjjhbz" placeholder="请选择数据对接类型">-->
                                <!--                                            <el-option label="全部" value=""></el-option>-->
                                <!--                                            <el-option label="对接成功" value="1"></el-option>-->
                                <!--                                            <el-option label="等待对接" value="0"></el-option>-->
                                <!--                                            <el-option label="对接异常" value="2"></el-option>-->
                                <!--                                            <el-option label="已推送省平台，等待数据入库" value="3"></el-option>-->
                                <!--                                            <el-option label="省平台已接收入库，校验结果等待中" value="4"></el-option>-->
                                <!--                                        </el-select>-->
                                <!--                                    </div>-->
                                <!--                                </el-col>-->
                                <el-col :span="3">
                                    <div class="grid-content bg-purple">
                                        <el-select v-model="failParams.serviceCode" placeholder="请选择数据对接类型">
                                            <el-option label="全部" value=""></el-option>
                                            <el-option label="账套数据" value="W01001"></el-option>
                                            <el-option label="账套科目初始化" value="W01002"></el-option>
                                            <el-option label="会计凭证数据" value="W01003"></el-option>
                                            <el-option label="删除会计凭证" value="D01003"></el-option>
                                            <el-option label="集体土地" value="W02005"></el-option>
                                            <el-option label="无形资产" value="W02004"></el-option>
                                            <el-option label="存货资产" value="W02003"></el-option>
                                            <el-option label="生物资产" value="W02002"></el-option>
                                            <el-option label="固定资产" value="W02001"></el-option>
                                            <el-option label="删除固定资产" value="D02001"></el-option>
                                            <el-option label="固定资产-信息变更" value="W01006"></el-option>
                                            <el-option label="固定资产-价值变动" value="W01007"></el-option>
                                            <el-option label="固定资产-处置记录" value="W01008"></el-option>
                                            <el-option label="固定资产-折旧记录" value="W01009"></el-option>
                                            <el-option label="收支日记账" value="W04001"></el-option>
                                            <el-option label="债权公布" value="W01012"></el-option>
                                            <el-option label="债务公布" value="W01011"></el-option>
                                            <el-option label="资产负债表" value="W01010"></el-option>
                                            <el-option label="合同信息" value="W03001"></el-option>
                                            <el-option label="账套月结" value="W01004"></el-option>
                                        </el-select>
                                    </div>
                                </el-col>
                                <el-col :span="6">
                                    <div class="grid-content bg-purple">
                                        <el-button type="primary" @click="getFailData()">搜索</el-button>
                                    </div>
                                </el-col>
                            </el-row>

                            <el-table
                                    :data="allFailData"
                                    style="width: 100%"
                                    height="700">
                                <el-table-column
                                        prop="taskId"
                                        label="任务id"
                                        width="180">
                                </el-table-column>
                                <el-table-column
                                        prop="type"
                                        label="类型"
                                        width="250">
                                </el-table-column>
                                <el-table-column
                                        prop="sjjhbz"
                                        width="180"
                                        label="数据交换标志">
                                    <template v-slot="scope">
                                        <el-tag type="success" v-if="scope.row.sjjhbz == '1'">对接成功</el-tag>
                                        <el-tag type="info" v-if="scope.row.sjjhbz == '0'">等待对接</el-tag>
                                        <el-tag type="danger" v-if="scope.row.sjjhbz == '2'">对接异常</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '3'">已推送省平台，等待数据入库</el-tag>
                                        <el-tag type="warning" v-if="scope.row.sjjhbz == '4'">省平台已接收入库，校验结果等待中</el-tag>
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="writeLog"
                                        label="错误信息"
                                        width="800">
                                </el-table-column>
                                <el-table-column
                                        prop="createDate"
                                        label="发送时间">
                                </el-table-column>
                                <el-table-column
                                        prop="writeDate"
                                        label="返回时间">
                                </el-table-column>

                                <!--                                <el-table-column-->
                                <!--                                        label="操作"-->
                                <!--                                        width="100">-->
                                <!--                                    <template slot-scope="scope">-->
                                <!--                                        <el-button @click="queryTaskStatus(scope.row)" type="text" size="small">查看</el-button>-->
                                <!--                                    </template>-->
                                <!--                                </el-table-column>-->
                            </el-table>
                            <el-pagination
                                    @size-change="handleFailDataSizeChange"
                                    @current-change="handleFailDataCurrentChange"
                                    :current-page="queryParams.current"
                                    :page-sizes="[30, 100, 200, 500, 1000]"
                                    :page-size="queryParams.size"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="allFailDataTotal">
                            </el-pagination>
                            <!--<div style="margin-top: 20px">
                                <el-button @click="pushMassage()">切换第二、第三行的选中状态</el-button>
                                <el-button @click="manualCollectData()" type="primary">手动采集数据</el-button>
                            </div>-->
                        </div>
                    </el-card>
                </el-tab-pane>


            </el-tabs>
        </div>
    </el-card>

    <!--<el-dialog
            title="添加用户"
            :visible.sync="addDialog"
            :close-on-click-modal=false
            width="30%"
            @close="addDialog = false">
        <template>
            <el-table
                    ref="singleTable"
                    :data="tableData"
                    highlight-current-row
                    @current-change="handleCurrentChange"
                    @row-click="rowClick"
                    style="width: 100%">
                <el-table-column
                        type="index"
                        width="50">
                </el-table-column>
                <el-table-column
                        property="date"
                        label="日期"
                        width="120">
                </el-table-column>
                <el-table-column
                        property="name"
                        label="姓名"
                        width="120">
                </el-table-column>
                <el-table-column
                        property="address"
                        label="地址">
                </el-table-column>
            </el-table>
            <div style="margin-top: 20px">
                &lt;!&ndash;                <el-button @click="setCurrent(tableData[1])">选中第二行</el-button>&ndash;&gt;
                <el-button @click="setCurrent()">取消选择</el-button>
            </div>
        </template>
        <span slot="footer" class="dialog-footer">
        <el-button @click="addDialog = false">取 消</el-button>
        <el-button type="primary" @click="addDialog = false">确 定</el-button>
      </span>
    </el-dialog>-->

</div>
</body>


<script>
    // import FileSaver from 'file-saver';
    // import XLSX from 'xlsx';

    var vue = new Vue({
        el: '#app',
        data() {
            return {
                addDialog: false,
                // ws是否启动
                wsIsRun: false,
                // 定义ws对象
                webSocket: null,
                // ws请求链接（类似于ws后台地址）
                ws: '',
                // ws定时器
                wsTimer: null,
                currentCollectData: [],
                allData: [],
                activeName: 'start',
                startParams: {
                    years: '',
                    months: '',
                    accSets: '',
                    serviceCode: '',
                    noCheck: false,
                    noCheckCanFlag: false
                },
                queryTaskIdParams: {
                    taskIds: ''
                },
                queryTaskIdResult: '',
                queryParams: {
                    creditCode: '',
                    opType: '',
                    years: '',
                    months: '',
                    serviceCode: 'W01001',
                    sjjhbz: '',
                    accSet: '',
                    current: 1,
                    size: 30
                },
                allDataTotal: 0,
                queryStatisticsParams: {
                    creditCode: '',
                    years: '',
                    months: '',
                    typeName: '',
                    info: ''
                },
                // 树形地区四无统计表
                queryStatisticsTreeDataParams: {
                    distNo: '',
                    years: '2024'
                },
                distCascaderProps: {
                    lazy: true,
                    checkStrictly: true,
                    expandTrigger: 'hover',
                    lazyLoad (node, resolve) {
                        const { level } = node;
                        if (level <= 1) {
                            const distNo = node.value === undefined ? "" : node.value;
                            axios.get("/query/dist", {params: {distNo: distNo, level: level}}).then((res) => {
                                let nodes = res.data.data;
                                resolve(nodes);
                            })
                        } else {
                            resolve([]);
                        }
                    }
                },
                allStatisticsData: [],
                duijieAsyncParams: {
                    creditCode: '',
                    serviceCode: '',
                    sjjhbz: '',
                    taskId: '',
                    current: 1,
                    size: 30
                },
                failParams: {
                    creditCode: '',
                    serviceCode: '',
                    sjjhbz: '',
                    current: 1,
                    size: 30
                },
                allFailData: [],
                allFailDataTotal: 0,
                duijieAsyncDataTotal: 0,
                allDuijieAsyncData: [],
                saveTypeName: '',
                currentRowColor: '',
                typeNameToColorMap: {},
                currentTabName: ''
            }
        },
        async mounted() {
            // this.wsIsRun = true
            // this.initWs()
        },
        methods: {
            //菜单改变事件
            handleClick(tab, event) {
                this.currentTabName = tab.name;
                this.queryParams = {
                    creditCode: '',
                    opType: '',
                    years: '',
                    months: '',
                    serviceCode: 'W01001',
                    sjjhbz: '',
                    current: 1,
                    size: 30
                }

                if (tab.name === "statisticsMonths") {
                    this.getStatisticsMonthsData()
                } else if (tab.name === "statistics") {
                    this.getStatisticsData()
                } else if (tab.name === "statisticsTreeData") {
                    this.getTreeStatisticsData()
                } else if (tab.name === "duijie_async") {
                    this.getDuijieAsyncData()
                } else if (tab.name === "fail") {
                    this.getFailData()
                } else if (tab.name === "start") {
                    // 开始对接页面 不用获取数据
                } else {
                    // 各张基础数据表的
                    this.queryParams.serviceCode = this.getServiceCodeByTabName(tab.name);
                    this.getAllData();
                }
            },

            getServiceCodeByTabName(tabName) {
                if (tabName === "accSet") {
                    return "W01001";
                } else if (tabName === "accCode") {
                    return "W01002";
                } else if (tabName === "voucher") {
                    return "W01003";
                } else if (tabName === "settlement") {
                    return "W01004";
                }
            },

            async queryTaskStatus(row) {
                let taskId = row.taskId

                const {data} = await axios.get('duijie/queryTaskFromTaskId', {params: {"taskIds": taskId}})

                console.log(data)

                let message = '暂时未入省平台数据库，无返回结果信息！';
                let taskState = 0
                let type = 'info';

                if (data.data.length > 0) {
                    message = data.data[0].message;
                    taskState = data.data[0].taskState;
                }

                if (taskState === 0 || taskState === 1) {
                    type = 'info';
                } else if (taskState === 2) {
                    type = 'warning';
                } else if (taskState === 3) {
                    type = 'success';
                } else {
                    type = 'error';
                }



                // this.$message({
                //     dangerouslyUseHTMLString: true,
                //     message: '' +
                //         '<strong>返回结果状态: <i>' + message + '</i> </strong></br>' +
                //         '<strong>返回结果信息: <i>' + taskState + '</i> </strong></br>',
                //     type: type
                // });

                const h = this.$createElement;
                this.$msgbox({
                    title: '返回结果',
                    message: h('p', null, [
                        h('span', null, '返回结果状态 '),
                        h('i', { style: 'color: teal' }, taskState),
                        h('br', null, null),
                        h('span', null, '返回结果信息'),
                        h('i', { style: 'color: teal' }, message),
                    ]),
                    showCancelButton: true,
                    confirmButtonText: '确定',
                    // cancelButtonText: '取消',
                    beforeClose: (action, instance, done) => {
                        done();
                    }
                }).then(action => {
                });
            },
            //获取所有采集数据
            async getAllData() {
                const {data} = await axios.get('query/getBaseDuijieData', {params: this.queryParams})
                // this.queryParams.current = data.data.number
                // this.queryParams.size = data.data.size
                var parse = JSON.parse(data.data);
                this.allDataTotal = parse.total
                this.allData = parse.data
            },
            handleAllDataSizeChange(val) {
                this.queryParams.size = val;
                this.getAllData();
            },
            handleAllDataCurrentChange(val) {
                this.queryParams.current = val;
                this.getAllData();
            },
            handleDuijieAsyncDataSizeChange(val) {
                this.duijieAsyncParams.size = val;
                this.getDuijieAsyncData();
            },
            handleDuijieAsyncDataCurrentChange(val) {
                this.duijieAsyncParams.current = val;
                this.getDuijieAsyncData();
            },
            handleFailDataSizeChange(val) {
                this.failParams.size = val;
                this.getFailData();
            },
            handleFailDataCurrentChange(val) {
                this.failParams.current = val;
                this.getFailData();
            },

            async tryPutData() {

                const {data} = await axios.get('duijie/start', {params: {serviceCode: this.queryParams.serviceCode}})

                if (data.code === 200) {
                    this.$message({
                        message: data.message,
                        type: 'success'
                    });
                }

            },

            async queryTaskId() {

                const {data} = await axios.get('duijie/queryTaskFromTaskId', {params: this.queryTaskIdParams})

                if (data.code === 200) {
                    this.queryTaskIdResult = JSON.stringify(data);
                } else {
                    this.$message({
                        message: data,
                        type: 'error'
                    });
                }

            },

            async startPushData() {

                const {data} = await axios.get('duijie/start', {params: this.startParams})

                if (data.code === 200) {
                    this.$message({
                        message: data.data,
                        type: 'success'
                    });
                } else {
                    this.$message({
                        message: data,
                        type: 'error'
                    });
                }

            },


            //获取统计表信息-月份
            async getStatisticsMonthsData() {
                const {data} = await axios.get('query/getStatisticsMonthsData', {params: this.queryStatisticsParams})
                // this.queryParams.current = data.data.number
                // this.queryParams.size = data.data.size
                // var parse = JSON.parse(data.data);
                this.allStatisticsData = data.data
            },

            //获取统计表信息
            async getStatisticsData() {
                const {data} = await axios.get('query/getStatisticsData', {params: this.queryStatisticsParams})
                // this.queryParams.current = data.data.number
                // this.queryParams.size = data.data.size
                // var parse = JSON.parse(data.data);
                this.allStatisticsData = data.data
            },

            //获取统计表信息-四无
            async getTreeStatisticsData() {
                const {data} = await axios.get('query/getTreeStatisticsData', {params: this.getqueryStatisticsTreeDataParams()})
                this.allStatisticsData = data.data
            },

            getqueryStatisticsTreeDataParams() {
                return {distNo: this.queryStatisticsTreeDataParams.distNo[this.queryStatisticsTreeDataParams.distNo.length-1],
                        years: this.queryStatisticsTreeDataParams.years};
            },

            exportExcelTreeStatisticsData() {
                let params = this.getqueryStatisticsTreeDataParams();
                window.open("query/exportTreeStatisticsData?distNo=" + (params.distNo === undefined ? "" : params.distNo) + "&years=" + params.years, "_blank");
            },

            //判断对接的情况
            judgeAbutmentInfo(row) {
                var needAbutment = row.info1;
                var successAbutment = row.info3;


                if (needAbutment <= 0) {
                    return '4';
                }

                if (needAbutment == successAbutment) {
                    return '5';
                }

                if (successAbutment <= needAbutment * 0.5) {
                    return '3';
                }

                if (successAbutment > needAbutment * 0.5 && successAbutment < needAbutment * 0.8) {
                    return '2';
                }

                if (successAbutment > needAbutment * 0.8) {
                    return '1';
                }
            },


            getColorForTypeName(typeName) {
                // 如果typeName已经在map中，则返回对应的颜色
                if (typeName in this.typeNameToColorMap) {
                    return this.typeNameToColorMap[typeName];
                }

                // 否则，为typeName分配一个新的颜色，并存储到map中
                // 这里使用'warning-row'和'success-row'两个颜色交替分配
                const newColor = Object.keys(this.typeNameToColorMap).length % 2 === 0 ? 'warning-row' : 'success-row';
                this.typeNameToColorMap[typeName] = newColor;
                return newColor;
            },


            tableRowClassName({row, rowIndex}) {

                // 获取当前行的typeName
                const typeName = row.typeName;

                // 根据typeName获取颜色
                const color = this.getColorForTypeName(typeName);

                // 打印typeName，用于调试（可选）
                console.log(typeName);

                // 返回对应的颜色类名
                return color;

            },

            async getDuijieAsyncData() {
                const {data} = await axios.get('query/getDuijieAsyncData', {params: this.duijieAsyncParams})
                // this.queryParams.current = data.data.number
                // this.queryParams.size = data.data.size
                // var parse = JSON.parse(data.data);
                this.duijieAsyncDataTotal = data.data.total
                this.allDuijieAsyncData = data.data.data
            },

            //获取失败信息
            async getFailData() {
                const {data} = await axios.get('query/getFailDetailData', {params: this.failParams})
                // this.queryParams.current = data.data.number
                // this.queryParams.size = data.data.size
                // var parse = JSON.parse(data.data);
                this.allFailData = data.data.data;
                this.allFailDataTotal = data.data.total;
            },

            // 设置选中数据为待推送数据
            async setToNeedDuijie() {
                let tabName = this.currentTabName;
                let ids = '';
                let selectionRows = this.$refs[tabName].selection;
                selectionRows.forEach(row => {
                    if (ids) ids += ",";
                    ids += row.id;
                });

                const {data} = await axios.get('duijie/updateSjjhbzByIds', {params: {serviceCode: this.getServiceCodeByTabName(tabName), ids: ids, opType: 1}})
                await this.getAllData();
                this.$message({
                    message: data,
                    type: data.code === 200 ? 'success' : 'error'
                });
            },

            viewSendContent(row) {
                let content = row.content;

                const h = this.$createElement;
                this.$msgbox({
                    title: '发送报文',
                    message: h('p', { style: 'word-wrap: break-word'}, content),
                    showCancelButton: true,
                    confirmButtonText: '确定',
                    customClass: 'viewSendContentMsgBox'
                });
            },

            // stateFormat(row, column, cellValue){
            //     // console.log(row);
            //     // console.log(column);
            //     // console.log(cellValue);
            //     if(row.flag){
            //         if (!cellValue) return '';
            //         if (cellValue.length > this.contentLength) {   // 超过contentLength长度的内容隐藏
            //             return cellValue.slice(0, this.contentLength) + '...';
            //         }
            //         return cellValue;
            //     }else{
            //         return cellValue;
            //     }
            // },
            //
            // clickContent(row, column, cell, event){
            //     if(column.label === "数据内容"){  // 只有点击数据内容列时才会展开
            //         row.flag = !row.flag;  // 这个参数是当时将数据存储到表格中时特意加上控制表格的展开和省略的
            //     }
            // }




            // initWs() {
            //     const wsuri = "ws://127.0.0.1:9998/websocket"
            //     this.ws = wsuri
            //     if (!this.wsIsRun) return
            //     // 销毁ws
            //     this.wsDestroy()
            //     // 初始化ws
            //     this.webSocket = new WebSocket(this.ws)
            //     // ws连接建立时触发
            //     this.webSocket.addEventListener('open', this.wsOpenHanler)
            //     // ws服务端给客户端推送消息
            //     this.webSocket.addEventListener('message', this.wsMessageHanler)
            //     // ws通信发生错误时触发
            //     this.webSocket.addEventListener('error', this.wsErrorHanler)
            //     // ws关闭时触发
            //     this.webSocket.addEventListener('close', this.wsCloseHanler)
            //
            //     // 检查ws连接状态,readyState值为0表示尚未连接，1表示建立连接，2正在关闭连接，3已经关闭或无法打开
            //     clearInterval(this.wsTimer)
            //     this.wsTimer = setInterval(() => {
            //         if (this.webSocket.readyState === 1) {
            //             clearInterval(this.wsTimer)
            //         } else {
            //             console.log('ws建立连接失败')
            //             this.initWs()
            //         }
            //     }, 3000)
            // },
            // wsOpenHanler(event) {
            //     console.log('ws建立连接成功')
            // },
            // wsMessageHanler(e) {
            //     const redata = JSON.parse(e.data)
            //     this.currentCollectData = redata;
            // },
            // /**
            //  * ws通信发生错误
            //  */
            // wsErrorHanler(event) {
            //     console.log(event, '通信发生错误')
            //     this.initWs()
            // },
            // /**
            //  * ws关闭
            //  */
            // wsCloseHanler(event) {
            //     console.log(event, 'ws关闭')
            //     this.initWs()
            // },
            // /**
            //  * 销毁ws
            //  */
            // wsDestroy() {
            //     if (this.webSocket !== null) {
            //         this.webSocket.removeEventListener('open', this.wsOpenHanler)
            //         this.webSocket.removeEventListener('message', this.wsMessageHanler)
            //         this.webSocket.removeEventListener('error', this.wsErrorHanler)
            //         this.webSocket.removeEventListener('close', this.wsCloseHanler)
            //         this.webSocket.close()
            //         this.webSocket = null
            //         clearInterval(this.wsTimer)
            //     }
            // },
        },
        filters: {
            dataFilter(date) {
                var unixTimestamp = new Date(date);
                var commonTime = unixTimestamp.toLocaleString();
                return commonTime;
            }
        },
        created() {
        }
    })

</script>

<script>
</script>
</body>
</html>